home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-08-10 | 22.1 KB | 594 lines | [TEXT/MPS ] |
- (*
- File: Sound.mod
-
- Contains: Sound Manager Interfaces.
-
- Version: Technology: System 7.5
- Package: Universal Interfaces 2.0 in “MPW Latest” on ETO #17
-
- Copyright: © 1984-1995 by Apple Computer, Inc.
- All rights reserved.
-
- Bugs?: If you find a problem with this file, use the Apple Bug Reporter
- stack. Include the file and version information (from above)
- in the problem description and send to:
- Internet: apple.bugs.applelink.apple.com
- AppleLink: APPLE.BUGS
-
- *)
-
- (*$IF UNDEFINED OLDROUTINENAMES*)
- (*$SET OLDROUTINENAMES FALSE*)
- (*$END*)
- (*$TAGS-*)
- (*$CALLING PASCAL*)
- MODULE Sound;
-
- IMPORT SYSTEM, Types;
-
- (* $PUSH*)
- (* $ALIGN MAC68K*)
- (* $LibExport+*)
- (*
- Interface for Sound Driver, !!! OBSOLETE and NOT SUPPORTED !!!
-
- These items are no longer defined, but appear here so that someone
- searching the interfaces might find them. If you are using one of these
- items, you must change your code to support the Sound Manager.
-
- swMode, ftMode, ffMode
- Sound.FreeWave, Sound.FFSynthRec, Sound.Tone, Sound.SWSynthRec, Sound.Wave, Sound.FTSoundRec
- SndCompletionProcPtr
- StartSound, StopSound, SoundDone
- *)
- CONST
- twelfthRootTwo* = 1.05946309434;
- soundListRsrc* = LONG("snd "); (*Resource type used by Sound Manager*)
- rate44khz* = $AC440000; (*44100.00000 in fixed-point*)
- rate22050hz* = $56220000; (*22050.00000 in fixed-point*)
- rate22khz* = $56EE8BA3; (*22254.54545 in fixed-point*)
- rate11khz* = $2B7745D1; (*11127.27273 in fixed-point*)
- rate11025hz* = $2B110000; (*11025.00000 in fixed-point*)
- (*synthesizer numbers for SndNewChannel*)
- squareWaveSynth* = 1; (*square wave synthesizer*)
- waveTableSynth* = 3; (*wave table synthesizer*)
- sampledSynth* = 5; (*sampled sound synthesizer*)
- (*old Sound Manager MACE synthesizer numbers*)
- MACE3snthID* = 11;
- MACE6snthID* = 13;
- kMiddleC* = 60; (*MIDI note value for middle C*)
- kSimpleBeepID* = 1; (*reserved resource AIFF.ID for Simple Beep*)
- kFullVolume* = $0100; (*1.0, setting for full hardware output volume*)
- kNoVolume* = 0; (*setting for no sound volume*)
- (*command numbers for SndDoCommand and SndDoImmediate*)
- nullCmd* = 0;
- initCmd* = 1;
- freeCmd* = 2;
- quietCmd* = 3;
- flushCmd* = 4;
- reInitCmd* = 5;
- waitCmd* = 10;
- pauseCmd* = 11;
- resumeCmd* = 12;
- callBackCmd* = 13;
-
- syncCmd* = 14;
- availableCmd* = 24;
- versionCmd* = 25;
- totalLoadCmd* = 26;
- loadCmd* = 27;
- freqDurationCmd* = 40;
- restCmd* = 41;
- freqCmd* = 42;
- ampCmd* = 43;
- timbreCmd* = 44;
- getAmpCmd* = 45;
- volumeCmd* = 46; (*sound manager 3.0 or later only*)
- getVolumeCmd* = 47; (*sound manager 3.0 or later only*)
- waveTableCmd* = 60;
- phaseCmd* = 61;
-
- soundCmd* = 80;
- bufferCmd* = 81;
- rateCmd* = 82;
- continueCmd* = 83;
- doubleBufferCmd* = 84;
- getRateCmd* = 85;
- rateMultiplierCmd* = 86;
- getRateMultiplierCmd* = 87;
- sizeCmd* = 90;
- convertCmd* = 91;
- stdQLength* = 128;
- dataOffsetFlag* = $8000;
-
- (*channel initialization parameters*)
- (*$IF OLDROUTINENAMES *)
- waveInitChannelMask* = $07;
- waveInitChannel0* = $04; (*wave table only, Sound Manager 2.0 and earlier*)
- waveInitChannel1* = $05; (*wave table only, Sound Manager 2.0 and earlier*)
- waveInitChannel2* = $06; (*wave table only, Sound Manager 2.0 and earlier*)
- waveInitChannel3* = $07; (*wave table only, Sound Manager 2.0 and earlier*)
- initChan0* = waveInitChannel0; (*obsolete spelling*)
- initChan1* = waveInitChannel1; (*obsolete spelling*)
- initChan2* = waveInitChannel2; (*obsolete spelling*)
- initChan3* = waveInitChannel3; (*obsolete spelling*)
-
- (*$END*)
- initChanLeft* = $0002; (*left stereo channel*)
- initChanRight* = $0003; (*right stereo channel*)
- initNoInterp* = $0004; (*no linear interpolation*)
- initNoDrop* = $0008; (*no drop-sample conversion*)
- initMono* = $0080; (*monophonic channel*)
- initStereo* = $00C0; (*stereo channel*)
- initMACE3* = $0300; (*MACE 3:1*)
- initMACE6* = $0400; (*MACE 6:1*)
- initPanMask* = $0003; (*mask for right/left pan values*)
- initSRateMask* = $0030; (*mask for sample rate values*)
- initStereoMask* = $00C0; (*mask for mono/stereo values*)
- initCompMask* = $FF00; (*mask for compression IDs*)
- kUseOptionalOutputDevice* = -1; (*only for Sound Manager 3.0 or later*)
- notCompressed* = 0; (*compression AIFF.ID's*)
- fixedCompression* = -1; (*compression AIFF.ID for fixed-sized compression*)
- variableCompression* = -2; (*compression AIFF.ID for variable-sized compression*)
- twoToOne* = 1;
- eightToThree* = 2;
- threeToOne* = 3;
- sixToOne* = 4;
-
- stdSH* = $00; (*Standard sound header encode value*)
- extSH* = $FF; (*Extended sound header encode value*)
- cmpSH* = $FE; (*Compressed sound header encode value*)
-
- outsideCmpSH* = 0; (*MACE constants*)
- insideCmpSH* = 1;
- aceSuccess* = 0;
- aceMemFull* = 1;
- aceNilBlock* = 2;
- aceBadComp* = 3;
- aceBadEncode* = 4;
- aceBadDest* = 5;
- aceBadCmd* = 6;
- sixToOnePacketSize* = 8;
- threeToOnePacketSize* = 16;
- stateBlockSize* = 64;
- leftOverBlockSize* = 32;
- firstSoundFormat* = $0001; (*general sound format*)
- secondSoundFormat* = $0002; (*special sampled sound format (HyperCard)*)
- dbBufferReady* = $00000001; (*double buffer is filled*)
- dbLastBuffer* = $00000004; (*last double buffer to play*)
- sysBeepDisable* = $0000; (*SysBeep() enable flags*)
- sysBeepEnable* = $0001;
- unitTypeNoSelection* = $FFFF; (*unitTypes for Sound.AudioSelection.unitType*)
- unitTypeSeconds* = $0000;
-
- (* unsigned fixed-point number *)
-
- TYPE
- UnsignedFixed* = LONGINT;
-
- SndCommand* = (*ΔΔPACKEDΔΔ*) RECORD
- cmd*: INTEGER;
- param1*: INTEGER;
- param2*: LONGINT;
- END;
-
- SndChannelPtr* = POINTER TO SndChannel;
-
- SndCallBackProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (chan: SndChannelPtr; VAR cmd: SndCommand);
- SndCallBackUPP* = Types.UniversalProcPtr;
-
- SndChannel* = (*ΔΔPACKEDΔΔ*) RECORD
- nextChan*: SndChannelPtr (*ΔΔ POINTER TO SndChannel*);
- firstMod*: Types.Ptr; (* reserved for the Sound Manager *)
- callBack*: SndCallBackUPP;
- userInfo*: LONGINT;
- wait*: LONGINT; (* The following is for internal Sound Manager use only.*)
- cmdInProgress*: SndCommand;
- flags*: INTEGER;
- qLength*: INTEGER;
- qHead*: INTEGER;
- qTail*: INTEGER;
- queue*: ARRAY (*ΔΔ[0..*)stdQLength(*ΔΔ -1]ΔΔ*) OF SndCommand;
- END;
-
- (*MACE structures*)
- StateBlock* = RECORD
- stateVar*: ARRAY (*ΔΔ[0..*)stateBlockSize(*ΔΔ -1]ΔΔ*) OF INTEGER;
- END;
-
- StateBlockPtr* = POINTER TO StateBlock;
-
- LeftOverBlock* = RECORD
- count*: LONGINT;
- sampleArea*: (*ΔΔPACKEDΔΔ*) ARRAY (*ΔΔ[0..*)leftOverBlockSize(*ΔΔ -1]ΔΔ*) OF CHAR;
- END;
-
- LeftOverBlockPtr* = POINTER TO LeftOverBlock;
-
- ModRef* = RECORD
- modNumber*: INTEGER;
- modInit*: LONGINT;
- END;
-
- SndListResource* = RECORD
- format*: INTEGER;
- numModifiers*: INTEGER;
- modifierPart*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF ModRef; (*This is a variable length array*)
- numCommands*: INTEGER;
- commandPart*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF SndCommand; (*This is a variable length array*)
- dataPart*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR; (*This is a variable length array*)
- END;
-
- SndListPtr* = POINTER TO SndListResource;
-
- SndListHndl* = HANDLE TO SndListResource (*ΔΔ POINTER TO SndListPtr*);
- SndListHandle* = HANDLE TO SndListResource (*ΔΔ POINTER TO SndListPtr*);
-
- (*HyperCard sound resource format*)
- Snd2ListResource* = RECORD
- format*: INTEGER;
- refCount*: INTEGER;
- numCommands*: INTEGER;
- commandPart*: ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF SndCommand; (*This is a variable length array*)
- dataPart*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR; (*This is a variable length array*)
- END;
-
- Snd2ListPtr* = POINTER TO Snd2ListResource;
-
- Snd2ListHndl* = HANDLE TO Snd2ListResource (*ΔΔ POINTER TO Snd2ListPtr*);
- Snd2ListHandle* = HANDLE TO Snd2ListResource (*ΔΔ POINTER TO Snd2ListPtr*);
-
- SoundHeader* = (*ΔΔPACKEDΔΔ*) RECORD
- samplePtr*: Types.Ptr; (*if NIL then samples are in sampleArea*)
- length*: LONGINT; (*length of sound in bytes*)
- sampleRate*: UnsignedFixed; (*sample rate for this sound*)
- loopStart*: LONGINT; (*start of looping portion*)
- loopEnd*: LONGINT; (*end of looping portion*)
- encode*: CHAR; (*header encoding*)
- baseFrequency*: CHAR; (*baseFrequency value*)
- sampleArea*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR; (*space for when samples follow directly*)
- END;
-
- SoundHeaderPtr* = POINTER TO SoundHeader;
-
- CmpSoundHeader* = (*ΔΔPACKEDΔΔ*) RECORD
- samplePtr*: Types.Ptr; (*if nil then samples are in sample area*)
- numChannels*: LONGINT; (*number of channels i.e. mono* = 1*)
- sampleRate*: UnsignedFixed; (*sample rate in Apples Types.Fixed point representation*)
- loopStart*: LONGINT; (*loopStart of sound before compression*)
- loopEnd*: LONGINT; (*loopEnd of sound before compression*)
- encode*: CHAR; (*data structure used , stdSH, extSH, or cmpSH*)
- baseFrequency*: CHAR; (*same meaning as regular SoundHeader*)
- numFrames*: LONGINT; (*length in frames ( packetFrames or sampleFrames )*)
- AIFFSampleRate*: Types.Extended80; (*IEEE sample rate*)
- markerChunk*: Types.Ptr; (*sync track*)
- format*: Types.OSType; (*data format type, was futureUse1*)
- futureUse2*: LONGINT; (*reserved by Apple*)
- stateVars*: StateBlockPtr; (*pointer to State Block*)
- leftOverSamples*: LeftOverBlockPtr; (*used to save truncated samples between compression calls*)
- compressionID*: INTEGER; (*0 means no compression, non zero means compressionID*)
- packetSize*: INTEGER; (*number of bits in compressed sample packet*)
- snthID*: INTEGER; (*resource AIFF.ID of Sound Manager snth that contains NRT C/E*)
- sampleSize*: INTEGER; (*number of bits in non-compressed sample*)
- sampleArea*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR; (*space for when samples follow directly*)
- END;
-
- CmpSoundHeaderPtr* = POINTER TO CmpSoundHeader;
-
- ExtSoundHeader* = (*ΔΔPACKEDΔΔ*) RECORD
- samplePtr*: Types.Ptr; (*if nil then samples are in sample area*)
- numChannels*: LONGINT; (*number of channels, ie mono* = 1*)
- sampleRate*: UnsignedFixed; (*sample rate in Apples Types.Fixed point representation*)
- loopStart*: LONGINT; (*same meaning as regular SoundHeader*)
- loopEnd*: LONGINT; (*same meaning as regular SoundHeader*)
- encode*: CHAR; (*data structure used , stdSH, extSH, or cmpSH*)
- baseFrequency*: CHAR; (*same meaning as regular SoundHeader*)
- numFrames*: LONGINT; (*length in total number of frames*)
- AIFFSampleRate*: Types.Extended80; (*IEEE sample rate*)
- markerChunk*: Types.Ptr; (*sync track*)
- instrumentChunks*: Types.Ptr; (*AIFF instrument chunks*)
- AESRecording*: Types.Ptr;
- sampleSize*: INTEGER; (*number of bits in sample*)
- futureUse1*: INTEGER; (*reserved by Apple*)
- futureUse2*: LONGINT; (*reserved by Apple*)
- futureUse3*: LONGINT; (*reserved by Apple*)
- futureUse4*: LONGINT; (*reserved by Apple*)
- sampleArea*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR; (*space for when samples follow directly*)
- END;
-
- ExtSoundHeaderPtr* = POINTER TO ExtSoundHeader;
-
- ConversionBlock* = RECORD
- destination*: INTEGER;
- unused*: INTEGER;
- inputPtr*: CmpSoundHeaderPtr;
- outputPtr*: CmpSoundHeaderPtr;
- END;
-
- ConversionBlockPtr* = POINTER TO ConversionBlock;
-
- SMStatus* = (*ΔΔPACKEDΔΔ*) RECORD
- smMaxCPULoad*: INTEGER;
- smNumChannels*: INTEGER;
- smCurCPULoad*: INTEGER;
- END;
-
- SMStatusPtr* = POINTER TO SMStatus;
-
- SCStatus* = RECORD
- scStartTime*: UnsignedFixed;
- scEndTime*: UnsignedFixed;
- scCurrentTime*: UnsignedFixed;
- scChannelBusy*: BOOLEAN;
- scChannelDisposed*: BOOLEAN;
- scChannelPaused*: BOOLEAN;
- scUnused*: BOOLEAN;
- scChannelAttributes*: LONGINT;
- scCPULoad*: LONGINT;
- END;
-
- SCStatusPtr* = POINTER TO SCStatus;
-
- AudioSelection* = (*ΔΔPACKEDΔΔ*) RECORD
- unitType*: LONGINT;
- selStart*: UnsignedFixed;
- selEnd*: UnsignedFixed;
- END;
-
- FilePlayCompletionProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (chan: SndChannelPtr);
- FilePlayCompletionUPP* = Types.UniversalProcPtr;
-
- CONST
- uppFilePlayCompletionProcInfo* = $000000C0; (* PROCEDURE (4 byte param); *)
-
- PROCEDURE NewFilePlayCompletionProc*(userRoutine: FilePlayCompletionProcPtr): FilePlayCompletionUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE CallFilePlayCompletionProc*(chan: SndChannelPtr; userRoutine: FilePlayCompletionUPP);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- TYPE
- AudioSelectionPtr* = POINTER TO AudioSelection;
-
- SndDoubleBuffer* = (*ΔΔPACKEDΔΔ*) RECORD
- dbNumFrames*: LONGINT;
- dbFlags*: LONGINT;
- dbUserInfo*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF LONGINT;
- dbSoundData*: (*ΔΔPACKEDΔΔ*) ARRAY 1 (*ΔΔ[0..0]ΔΔ*) OF CHAR;
- END;
-
- SndDoubleBufferPtr* = POINTER TO SndDoubleBuffer;
-
- SndDoubleBackProcPtr* = (*ΔΔ Types.ProcPtr;*) PROCEDURE (channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr);
- SndDoubleBackUPP* = Types.UniversalProcPtr;
-
- CONST
- uppSndDoubleBackProcInfo* = $000003C0; (* PROCEDURE (4 byte param, 4 byte param); *)
-
- PROCEDURE NewSndDoubleBackProc*(userRoutine: SndDoubleBackProcPtr): SndDoubleBackUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE CallSndDoubleBackProc*(channel: SndChannelPtr; doubleBufferPtr: SndDoubleBufferPtr; userRoutine: SndDoubleBackUPP);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- TYPE
- SndDoubleBufferHeader* = (*ΔΔPACKEDΔΔ*) RECORD
- dbhNumChannels*: INTEGER;
- dbhSampleSize*: INTEGER;
- dbhCompressionID*: INTEGER;
- dbhPacketSize*: INTEGER;
- dbhSampleRate*: UnsignedFixed;
- dbhBufferPtr*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF SndDoubleBufferPtr;
- dbhDoubleBack*: SndDoubleBackUPP;
- END;
-
- SndDoubleBufferHeaderPtr* = POINTER TO SndDoubleBufferHeader;
-
- SndDoubleBufferHeader2* = (*ΔΔPACKEDΔΔ*) RECORD
- dbhNumChannels*: INTEGER;
- dbhSampleSize*: INTEGER;
- dbhCompressionID*: INTEGER;
- dbhPacketSize*: INTEGER;
- dbhSampleRate*: UnsignedFixed;
- dbhBufferPtr*: ARRAY 2 (*ΔΔ[0..1]ΔΔ*) OF SndDoubleBufferPtr;
- dbhDoubleBack*: SndDoubleBackUPP;
- dbhFormat*: Types.OSType;
- END;
-
- SndDoubleBufferHeader2Ptr* = POINTER TO SndDoubleBufferHeader2;
-
- SoundInfoList* = (*ΔΔPACKEDΔΔ*) RECORD
- count*: INTEGER;
- infoHandle*: Types.Handle;
- END;
-
- SoundInfoListPtr* = POINTER TO SoundInfoList;
-
- CompressionInfo* = RECORD
- recordSize*: LONGINT;
- format*: Types.OSType;
- compressionID*: INTEGER;
- samplesPerPacket*: INTEGER;
- bytesPerPacket*: INTEGER;
- bytesPerFrame*: INTEGER;
- bytesPerSample*: INTEGER;
- futureUse1*: INTEGER;
- END;
-
- CompressionInfoPtr* = POINTER TO CompressionInfo;
-
- CompressionInfoHandle* = HANDLE TO CompressionInfo (*ΔΔ POINTER TO CompressionInfoPtr*);
-
- (* These two routines for Get/SetSoundVol should no longer be used.*)
- (* They were for old Apple Sound Chip machines, and do not support the DSP or PowerMacs.*)
- (* Use Get/SetDefaultOutputVolume instead, if you must change the user's machine.*)
- (*$IF OLDROUTINENAMES AND NOT GENERATINGCFM *)
-
- PROCEDURE SetSoundVol*(level: INTEGER);
- EXTERNAL PASCAL;
- PROCEDURE GetSoundVol*(VAR level: INTEGER);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4218, $10B8, $0260;
- (*$END*)
- (*$END*)
-
- PROCEDURE SndDoCommand*(chan: SndChannelPtr; (*CONST*)VAR cmd: SndCommand; noWait: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A803;
- (*$END*)
- PROCEDURE SndDoImmediate*(chan: SndChannelPtr; (*CONST*)VAR cmd: SndCommand): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A804;
- (*$END*)
- PROCEDURE SndNewChannel*(VAR chan: SndChannelPtr; synth: INTEGER; init: LONGINT; userRoutine: SndCallBackUPP): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A807;
- (*$END*)
- PROCEDURE SndDisposeChannel*(chan: SndChannelPtr; quietNow: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A801;
- (*$END*)
- PROCEDURE SndPlay*(chan: SndChannelPtr; sndHdl: SndListHandle; async: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A805;
- (*$END*)
- (*$IF OLDROUTINENAMES *)
- PROCEDURE SndAddModifier*(chan: SndChannelPtr; modifier: Types.Ptr; id: INTEGER; init: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A802;
- (*$END*)
- (*$END*)
- PROCEDURE SndControl*(id: INTEGER; VAR cmd: SndCommand): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $A806;
- (*$END*)
- (* Sound Manager 2.0 and later, uses _SoundDispatch *)
- PROCEDURE SndSoundManagerVersion*(): LONGINT (*ΔΔ NumVersion*);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $000C, $0008, $A800;
- (*$END*)
- PROCEDURE SndStartFilePlay*(chan: SndChannelPtr; fRefNum: INTEGER; resNum: INTEGER; bufferSize: LONGINT; theBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; theSelection: AudioSelectionPtr; theCompletion: FilePlayCompletionUPP; async: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0D00, $0008, $A800;
- (*$END*)
- PROCEDURE SndPauseFilePlay*(chan: SndChannelPtr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0204, $0008, $A800;
- (*$END*)
- PROCEDURE SndStopFilePlay*(chan: SndChannelPtr; quietNow: BOOLEAN): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0308, $0008, $A800;
- (*$END*)
- PROCEDURE SndChannelStatus*(chan: SndChannelPtr; theLength: INTEGER; theStatus: SCStatusPtr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0510, $0008, $A800;
- (*$END*)
- PROCEDURE SndManagerStatus*(theLength: INTEGER; theStatus: SMStatusPtr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0314, $0008, $A800;
- (*$END*)
- PROCEDURE SndGetSysBeepState*(VAR sysBeepState: INTEGER);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0218, $0008, $A800;
- (*$END*)
- PROCEDURE SndSetSysBeepState*(sysBeepState: INTEGER): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $011C, $0008, $A800;
- (*$END*)
- PROCEDURE SndPlayDoubleBuffer*(chan: SndChannelPtr; theParams: SndDoubleBufferHeaderPtr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0420, $0008, $A800;
- (*$END*)
- (* MACE compression routines *)
- PROCEDURE MACEVersion*(): LONGINT (*ΔΔ NumVersion*);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0000, $0010, $A800;
- (*$END*)
- PROCEDURE Comp3to1*(inBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; outBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; cnt: LONGINT; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: LONGINT; whichChannel: LONGINT);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0004, $0010, $A800;
- (*$END*)
- PROCEDURE Exp1to3*(inBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; outBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; cnt: LONGINT; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: LONGINT; whichChannel: LONGINT);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0008, $0010, $A800;
- (*$END*)
- PROCEDURE Comp6to1*(inBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; outBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; cnt: LONGINT; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: LONGINT; whichChannel: LONGINT);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $000C, $0010, $A800;
- (*$END*)
- PROCEDURE Exp1to6*(inBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; outBuffer: (*ΔΔUNIVΔΔ*) Types.Ptr; cnt: LONGINT; inState: StateBlockPtr; outState: StateBlockPtr; numChannels: LONGINT; whichChannel: LONGINT);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0010, $0010, $A800;
- (*$END*)
- (* Sound Manager 3.0 and later calls *)
- PROCEDURE GetSysBeepVolume*(VAR level: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0224, $0018, $A800;
- (*$END*)
- PROCEDURE SetSysBeepVolume*(level: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0228, $0018, $A800;
- (*$END*)
- PROCEDURE GetDefaultOutputVolume*(VAR level: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $022C, $0018, $A800;
- (*$END*)
- PROCEDURE SetDefaultOutputVolume*(level: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0230, $0018, $A800;
- (*$END*)
- PROCEDURE GetSoundHeaderOffset*(sndHandle: SndListHandle; VAR offset: LONGINT): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0404, $0018, $A800;
- (*$END*)
- PROCEDURE UnsignedFixedMulDiv*(value: UnsignedFixed; multiplier: UnsignedFixed; divisor: UnsignedFixed): UnsignedFixed;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $060C, $0018, $A800;
- (*$END*)
- PROCEDURE GetCompressionInfo*(compressionID: INTEGER; format: Types.OSType; numChannels: INTEGER; sampleSize: INTEGER; cp: CompressionInfoPtr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0710, $0018, $A800;
- (*$END*)
- PROCEDURE SetSoundPreference*(theType: Types.OSType; VAR name: Types.Str255; settings: Types.Handle): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0634, $0018, $A800;
- (*$END*)
- PROCEDURE GetSoundPreference*(theType: Types.OSType; VAR name: Types.Str255; settings: Types.Handle): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0638, $0018, $A800;
- (*$END*)
- (* Sound Manager 3.1 and later calls *)
- PROCEDURE SndGetInfo*(chan: SndChannelPtr; selector: Types.OSType; infoPtr: (*ΔΔUNIVΔΔ*) Types.Ptr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $063C, $0018, $A800;
- (*$END*)
- PROCEDURE SndSetInfo*(chan: SndChannelPtr; selector: Types.OSType; infoPtr: (*ΔΔUNIVΔΔ*) Types.Ptr): Types.OSErr;
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $203C, $0640, $0018, $A800;
- (*$END*)
- CONST
- uppSndCallBackProcInfo* = $000003C0; (* PROCEDURE (4 byte param, 4 byte param); *)
-
- PROCEDURE NewSndCallBackProc*(userRoutine: SndCallBackProcPtr): SndCallBackUPP;
- (*$IF NOT GENERATINGCFM *)
- INLINE PASCAL $2E9F;
- (*$END*)
-
- PROCEDURE CallSndCallBackProc*(chan: SndChannelPtr; VAR cmd: SndCommand; userRoutine: SndCallBackUPP);
- (*$IF NOT GENERATINGCFM*)
- INLINE PASCAL $205F, $4E90;
- (*$END*)
-
- (* $ALIGN RESET*)
- (* $POP*)
-
- END Sound.
-